3.35 \(\int (c+d x) \sec ^2(a+b x) \, dx\)

Optimal. Leaf size=28 \[ \frac{d \log (\cos (a+b x))}{b^2}+\frac{(c+d x) \tan (a+b x)}{b} \]

[Out]

(d*Log[Cos[a + b*x]])/b^2 + ((c + d*x)*Tan[a + b*x])/b

________________________________________________________________________________________

Rubi [A]  time = 0.0273841, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4184, 3475} \[ \frac{d \log (\cos (a+b x))}{b^2}+\frac{(c+d x) \tan (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Sec[a + b*x]^2,x]

[Out]

(d*Log[Cos[a + b*x]])/b^2 + ((c + d*x)*Tan[a + b*x])/b

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d x) \sec ^2(a+b x) \, dx &=\frac{(c+d x) \tan (a+b x)}{b}-\frac{d \int \tan (a+b x) \, dx}{b}\\ &=\frac{d \log (\cos (a+b x))}{b^2}+\frac{(c+d x) \tan (a+b x)}{b}\\ \end{align*}

Mathematica [A]  time = 0.012524, size = 36, normalized size = 1.29 \[ \frac{d \log (\cos (a+b x))}{b^2}+\frac{c \tan (a+b x)}{b}+\frac{d x \tan (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Sec[a + b*x]^2,x]

[Out]

(d*Log[Cos[a + b*x]])/b^2 + (c*Tan[a + b*x])/b + (d*x*Tan[a + b*x])/b

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 37, normalized size = 1.3 \begin{align*}{\frac{d\tan \left ( bx+a \right ) x}{b}}+{\frac{d\ln \left ( \cos \left ( bx+a \right ) \right ) }{{b}^{2}}}+{\frac{c\tan \left ( bx+a \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*sec(b*x+a)^2,x)

[Out]

1/b*d*tan(b*x+a)*x+d*ln(cos(b*x+a))/b^2+1/b*c*tan(b*x+a)

________________________________________________________________________________________

Maxima [B]  time = 2.11492, size = 215, normalized size = 7.68 \begin{align*} \frac{2 \, c \tan \left (b x + a\right ) - \frac{2 \, a d \tan \left (b x + a\right )}{b} + \frac{{\left ({\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + 4 \,{\left (b x + a\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d}{{\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} b}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)^2,x, algorithm="maxima")

[Out]

1/2*(2*c*tan(b*x + a) - 2*a*d*tan(b*x + a)/b + ((cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a)
+ 1)*log(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1) + 4*(b*x + a)*sin(2*b*x + 2*a))*d/(
(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*b))/b

________________________________________________________________________________________

Fricas [A]  time = 1.40773, size = 115, normalized size = 4.11 \begin{align*} \frac{d \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right )\right ) +{\left (b d x + b c\right )} \sin \left (b x + a\right )}{b^{2} \cos \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)^2,x, algorithm="fricas")

[Out]

(d*cos(b*x + a)*log(-cos(b*x + a)) + (b*d*x + b*c)*sin(b*x + a))/(b^2*cos(b*x + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right ) \sec ^{2}{\left (a + b x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)**2,x)

[Out]

Integral((c + d*x)*sec(a + b*x)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.59505, size = 1970, normalized size = 70.36 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sec(b*x+a)^2,x, algorithm="giac")

[Out]

-1/2*(4*b*d*x*tan(1/2*b*x)^2*tan(1/2*a) + 4*b*d*x*tan(1/2*b*x)*tan(1/2*a)^2 - d*log(4*(tan(1/2*a)^4 + 2*tan(1/
2*a)^2 + 1)/(tan(1/2*b*x)^8*tan(1/2*a)^4 - 2*tan(1/2*b*x)^8*tan(1/2*a)^2 - 8*tan(1/2*b*x)^7*tan(1/2*a)^3 + tan
(1/2*b*x)^8 + 8*tan(1/2*b*x)^7*tan(1/2*a) + 16*tan(1/2*b*x)^6*tan(1/2*a)^2 - 8*tan(1/2*b*x)^5*tan(1/2*a)^3 - 2
*tan(1/2*b*x)^4*tan(1/2*a)^4 + 8*tan(1/2*b*x)^5*tan(1/2*a) + 36*tan(1/2*b*x)^4*tan(1/2*a)^2 + 8*tan(1/2*b*x)^3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